package interview.huawei.tjt.training.huaweijishitiku;

import java.util.Scanner;

// 二进制转字符串
public class ErjinzhiToString {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextDouble()) {
            double d = sc.nextDouble();
            int count = 32;
            double num = 0;
            StringBuffer stringBuffer = new StringBuffer();
            stringBuffer.append("0.");
            while ( d > 0.0 ) {
                count --;
                if (count == 0) {
                    System.out.println("error");
                    break;
                }
                num = d * 2;
                if (num >= 1) {
                    d = num - 1;
                    stringBuffer.append("1");
                } else {
                    d = num;
                    stringBuffer.append("0");
                }
            }
            if (count > 0) {
                System.out.println(stringBuffer.toString());
            }

        }
    }

}
